<template>
    <view>
        <image src="/static/img/kf.png" class="customer-service-img" mode="aspectFit" @click="handleTurnToCustomerService"></image>
    </view>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
    name: "CustomerService",
    data() {
        return {
        };
    },
    computed: {
        ...mapGetters('user', ['userInfo']),
    },
    methods: {
        handleTurnToCustomerService() {
            // #ifdef H5
            if(this.userInfo.customer_link) window.location.href = this.userInfo.customer_link;
            // #endif
            // #ifdef MP-WEIXIN
            if(this.userInfo.customer_link) window.location.href = this.userInfo.customer_link;
            // #endif
            // #ifdef APP-PLUS
            if(this.userInfo.customer_link) plus.runtime.openURL(this.userInfo.customer_link);
            // #endif
        }
    }
}
</script>

<style>
.customer-service-img {
    position: fixed;
    bottom: 30rpx;
    right: 30rpx;
    width: 120rpx;
    height: 120rpx;
	z-index: 99;
}
</style>